package com.neaten.functionArrangement.common;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;


@Data
@NoArgsConstructor
@AllArgsConstructor
public class Result {
    private Boolean success;
    private Object data;
    private Integer total;


    public static Result success() {
        return new Result(true, null, null);
    }

    public static Result success(Object data) {
        return new Result(true, data, null);
    }

    public static Result success(Object data, Integer total) {
        return new Result(true, data, total);
    }

    public static Result fail(Object data) {
        return new Result(false, data, null);
    }

    public static Result fail(Object data, Integer total) {
        return new Result(false, data, total);
    }
}
